package cn.rick.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 主材料表
 * </p>
 *
 * @author house_store
 * @since 2022-11-03 08:42:42
 */
@Data
@TableName("build_materials")
@ApiModel(value = "BuildMaterials对象", description = "主材料表")
public class BuildMaterials implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty("主材料id")
    private Long id;

    @ApiModelProperty("主材料名称")
    @ExcelProperty("主材料名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("主材料分类")
    @ExcelProperty("主材料分类")
    @TableField("category")
    private Long category;

    @ApiModelProperty("材料尺寸")
    @ExcelProperty("材料尺寸")
    @TableField("size")
    private String size;

    @ApiModelProperty("材料包装尺寸")
    @ExcelProperty("材料包装尺寸")
    @TableField("package_size")
    private String packageSize;

    @ApiModelProperty("规格型号")
    @ExcelProperty("规格型号")
    @TableField("model")
    private String model;

    @ApiModelProperty("采购价格")
    @ExcelProperty("采购价格")
    @TableField("buy_price")
    private BigDecimal buyPrice;

    @ApiModelProperty("销售价格")
    @ExcelProperty("销售价格")
    @TableField("sale_price")
    private BigDecimal salePrice;

    @ApiModelProperty("基本单位")
    @ExcelProperty("基本单位")
    @TableField("normal_unit")
    private String normalUnit;

    @ApiModelProperty("销售单位")
    @ExcelProperty("销售单位")
    @TableField("sale_unit")
    private String saleUnit;

    @ApiModelProperty("采购单位")
    @ExcelProperty("采购单位")
    @TableField("buy_unit")
    private String buyUnit;

    @ApiModelProperty("所属供应商")
    @ExcelProperty("所属供应商")
    @TableField("supplier")
    private Long supplier;

    @ApiModelProperty("供应商货号")
    @ExcelProperty("供应商货号")
    @TableField("supplier_article_no")
    private String supplierArticleNo;

    @ApiModelProperty("产地")
    @ExcelProperty("产地")
    @TableField("made_in")
    private String madeIn;

    @TableField("create_by")
    @ExcelProperty("创建者")
    private String createBy;

    @TableField("create_time")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField("update_by")
    @ExcelProperty("更新者")
    private String updateBy;

    @TableField("update_time")
    @ExcelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("删除标志")
    @TableField("del_flag")
    @TableLogic
    @ExcelIgnore
    private String delFlag;

    @ApiModelProperty("备注信息")
    @TableField("remark")
    @ExcelProperty("备注信息")
    private String remark;

    @TableField(exist = false)
    @ExcelProperty("分类名称")
    private String categoryName;
}
